package com.cyh.testdesignpattern.adapter.objectadapter;

import android.util.Log;

public class ObjectPhone {
    public void charging(IObjectVoltage5V iVoltage5V) {
        if(iVoltage5V.output5V() == 5) {
            Log.i("Phone", "对象适配器、电压是5V, 可以充电");
        } else {
            Log.i("Phone", "对象适配器、电压不是5V, 不可以充电");
        }
    }
}
